Skip to main content
GET
/
api
/
productos
/
sku
/
{sku}
Get Product by SKU
curl --request GET \
  --url https://api.example.com/api/productos/sku/{sku}
{
  "200": {},
  "404": {},
  "producto_id": 123,
  "sku": "<string>",
  "nombre": "<string>",
  "descripcion": "<string>",
  "precioCantidad": 123,
  "precioMoneda": "<string>",
  "dimensionesAlto": 123,
  "dimensionesAncho": 123,
  "dimensionesProfundo": 123,
  "es_destacado": true,
  "stock": 123,
  "imagen_url": "<string>",
  "categoria": {
    "categoria_id": 123,
    "nombre": "<string>",
    "slug": "<string>"
  }
}

Authentication

This endpoint is publicly accessible and does not require authentication.

Path Parameters

sku
string
required
The Stock Keeping Unit (SKU) - a unique product code used for inventory management

Response

Returns a single product object with complete details.
producto_id
long
Unique identifier for the product
sku
string
Stock Keeping Unit - unique product code
nombre
string
Product name
descripcion
string
Detailed product description
precioCantidad
number
Product price amount
precioMoneda
string
Currency code (e.g., “EUR”, “USD”)
dimensionesAlto
number
Product height in centimeters
dimensionesAncho
number
Product width in centimeters
dimensionesProfundo
number
Product depth in centimeters
es_destacado
boolean
Whether the product is featured
stock
integer
Available quantity in inventory
imagen_url
string
URL to the product image
categoria
object

Example Request

cURL
curl -X GET "http://localhost:8080/api/productos/sku/SOFA-001"
JavaScript
const response = await fetch('http://localhost:8080/api/productos/sku/SOFA-001');
const product = await response.json();
Python
import requests

response = requests.get('http://localhost:8080/api/productos/sku/SOFA-001')
product = response.json()

Example Response

{
  "producto_id": 1,
  "sku": "SOFA-001",
  "nombre": "Sofá Klippan 2 plazas",
  "descripcion": "Sofá compacto y versátil con funda lavable",
  "precioCantidad": 299.00,
  "precioMoneda": "EUR",
  "dimensionesAlto": 66,
  "dimensionesAncho": 180,
  "dimensionesProfundo": 88,
  "es_destacado": true,
  "stock": 12,
  "imagen_url": "https://example.com/sofa-klippan.jpg",
  "categoria": {
    "categoria_id": 1,
    "nombre": "Salón",
    "slug": "salon"
  }
}

Status Codes

200
OK
Product found and returned successfully
404
Not Found
No product found with the specified SKU

Use Cases

  • Barcode scanning: Look up products using scanned SKU codes
  • Inventory management: Retrieve product details by SKU for stock operations
  • External integrations: Sync products with external systems using SKU as the key
SKU codes are unique across all products. This endpoint is commonly used in warehouse management and point-of-sale systems.